<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN"
	dir="ltr">
<head>
<title>Moment Mobile Payments</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/styles/layout.css" type="text/css" />
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="<%=request.getContextPath()%>/js/validation.js"></script>
<style>
.control-label {
	display: inline-block;
	width: 250px;
}

.control-group {
	padding-bottom: 10px;
}
</style>
</head>
<body id="top">
	<%@include file="loggedinheader.jsp"%>
	<%@ page import="org.json.*"%>
	<%@ page import="com.moment.model.*"%>
	<%@page import="com.moment.webservice.*"%>
	<%@page import="com.moment.util.Converter"%>
	<%@page import="java.util.HashMap"%>
	<%@page import="java.util.Map"%>
	<%@ page language="java" contentType="text/html; charset=UTF-8"
		pageEncoding="UTF-8"%>
	<%@page import="java.util.*"%>
	<%!String s[];%>

	You are not logged in
	<br />
	<a href="index.jsp">Please Login</a>
	<jsp:useBean id="userObj" class="com.moment.model.UserReg"
		scope="session" />
	<div class="wrapper col3">

		<div id="intro">
			<div id="logout">
				<a href="/MMP/LogoutController"><img
					src="<%=request.getContextPath()%>/images/logout.png" alt="Logout" /></a>
			</div>
			<div class="fl_left1">

				<div id="login1">
					<div class="imgl">
						<img alt="Embedded Image" height="128" width="128"
							src="data:image/jpeg;base64,<jsp:getProperty name="userObj" property="imagestr" />" />
					</div>
				</div>
				<div id="instrumentsmain">
					<div>

						<h2>
							<center>Add Cashier</center>
						</h2>
					</div>
					<form action="../CashierController" method="post">
						<div class="control-group">
							<label class="control-label" for="cname"> Name:</label> <input
								type="text" size="27" name="cname" id="cname" class="required" />
							<span style="display: none;" class="help-inline">Please
								fill instrument name</span>

						</div>
						<div class="control-group">
							<label class="control-label" for="clocation"> Location:</label> <select
								id="clocation" name="clocation">
								<%
									//--New CODE-------------
									Map<String, String> map = new HashMap<String, String>();
									map.put("method", "17");
									map.put("mnum", (String) session.getAttribute("username"));

									String json = new Converter().mapToJson(map);
									System.out.println("json String :" + json);
									Services serviceproxy = new ServicesProxy();

									String location = serviceproxy.service(json);
									// ---------------------------
									/* WebsProxy ws = new WebsProxy();
									String mnumber = (String) session.getAttribute("username");
									String location = ws.fetchLocation(mnumber); */
									LocationData locationData = new LocationData();
									locationData.setLocationlist(location);
									String[] location_details = locationData.getLocationlist().split(
											"-");
									for (String s : location_details) {
										out.println("<option value='" + s + "'>" + s + "</option>");
									}
								%>
							</select> <span style="display: none;" class="help-inline">Please
								fill instrument name</span>

						</div>
						<div class="control-group">
							<label class="control-label" for="cnum"> Mobile Number:</label> <input
								type="text" size="27" name="cnum" id="cnum"
								class="required mobile" /> <span style="display: none;"
								class="help-inline">Please fill instrument name</span>

						</div>
						<div class="control-group">
							<label class="control-label" for="cpassword"> Password:</label> <input
								type="password" size="27" name="cpassword" id="cpassword"
								class="required password" /> <span style="display: none;"
								class="help-inline">Please fill instrument name</span>

						</div>
						<div class="control-group">
							<label class="control-label" for="cpassword1"> Retype
								Password:</label> <input type="text" size="27" name="cpassword1"
								id="cpassword1" class="required password" /> <span
								style="display: none;" class="help-inline">Please fill
								instrument name</span>

						</div>

						<div class="fl_right">
							<input type="submit" class="myButton" value="Submit" /> <input
								type="hidden" name="ctype" value="add" />
						</div>
					</form>




				</div>

			</div>
		</div>
	</div>
	<br class="clear" />


	<%@include file="footer.jsp"%>


</body>
</html>

